<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/base/base.jsp"%>
<%@ include file="/base/database.jsp" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title>学生的在校课程成绩</title>
<link rel="stylesheet" href="css/pintuer.css">
<link rel="stylesheet" href="css/admin.css">
<link rel="shortcut icon" href="images/logo.jpg">
<script src="js/jquery.js"></script>
<script src="js/pintuer.js"></script>

</head>

<body>

  <div class="panel admin-panel">
    <div class="panel-head"><strong class="icon-reorder">学生的在校课程成绩</strong> </div>
    <div class="padding border-bottom">
      <ul class="search" style="padding-left:10px;">
        <li>按学生学号搜索：</li>
        <form action="page/instructor/score/action_searchscore.jsp" method="post">       
        <li><input type="text" placeholder="请输入搜索关键字" name=studentNo class="input" style="width:250px; line-height:17px;display:inline-block" /></li>
         <input type="submit"  class="panel-head" value="查询"/>
        </form>
      </ul>
    </div>
    <table class="table table-hover text-center">
      <tr>
       			<th>序号</th>
       			<th>学号</th>
				<th>学年</th>
				<th>学期</th>
				<th>姓名</th>		
				<th>课程名称</th>
				<th>所在班级</th>
				<th>课程性质</th>
				<th>学分</th>
				<th>绩点</th>
				<th>成绩</th>
				<th>补考成绩</th>
				<th>学院</th>
      </tr>
    
				
				
			<%--读取所有二级学院信息记录 --%>
			<%  //设置编码方式
			    request.setCharacterEncoding("utf-8");
			    //接收参数
			    String  keyword=request.getParameter("keyword");
			
				StringBuffer sqlBuff = new StringBuffer();
				sqlBuff.append("select * from sys_score where 1=1");
				String sql = sqlBuff.toString();
				//2:查询数据库记录
				//2.1 加载驱动
				Connection conn = getConn();
				//2.3:由给定Connection类型的连接对象conn执行SQL指令的PrepareStatement类型的对象pstmt
				PreparedStatement pstmt = conn.prepareStatement(sql);

				//2.4:PrepareStatement类型的对象pstmt执行SQL查询语句并返回结果
				ResultSet rs = pstmt.executeQuery();
				//定义int序号变量
				int index = 1;
				while (rs.next()) {
					
				
				String year=rs.getString("year");
				String term=rs.getString("term");
				String studentName=rs.getString("studentName");			
				String courseName=rs.getString("courseName");
				String studentNo=rs.getString("studentNo");	
				String className=rs.getString("className");			
				String feature=rs.getString("feature");			
				String credit=rs.getString("credit");				
				String gpa=rs.getString("gpa");
				String score=rs.getString("score");
				String rescore=rs.getString("rescore");
				String institude=rs.getString("institude");
			%>

			<tr>
				
				 <td><%=index++ %></td>
				 <td><%=studentNo%></td>
				<td><%=year%></td>
				<td><%=term%></td>
				<td><%=studentName%></td>
				<td><%=courseName %></td>
				<td><%=className %></td>
				<td><%=feature%></td>
				<td><%=credit %></td>				
				<td><%=gpa%></td>
				<td><%=score %></td>				
				<td><%=rescore%></td>
				<td><%=institude %></td>
			</tr>
			<%
				}
			%>
    </table>
  </div>
</body>
</html>
